import { defineStore } from 'pinia'

export const useInstantMessage = defineStore({
  id: 'instantMessage',
  state: () => {
    return {
      chatGroup: '',
      userSig: '',
    }
  },
  actions: {
    setChatGroup(chatGroup: string){
      this.$state.chatGroup = chatGroup
      return true
    },
    setUserSig(userSig: string){
      this.$state.userSig = userSig
      return true
    },
  },
  getters: {
    getChatGroup: (state:any) => {
      return state.chatGroup
    }
  },
})
